#Include 'Protheus.ch'

User Function ex005()

Local cAlias 		:= GetNexAlias()
Local cCampos		:= "B1_C0D/B1_DESC/A2_DESC"
Local aAlias 		:= {"SB1","SA2"}
Local aStru		:= {}
Local aArqStru	:= {}
Local cIndTRB		:= ""
Local cNomeArq	:= ""

	For nCount := 1 To Len(aAlias)
	
		dbSelectArea("SX3")
		dbSetOrder(1)
		If MsSeek(aAlias[nCount])
			
			While !SX3->(Eof()) .And. SX3->X3_ARQUIVO == aAlias[nCount]
				If X3Uso(SX3->X3_USADO) .And. cNivel >= SX3->X3_NIVEL .And. SX3->X3_CAMPO & cCampos
					aAdd(aArqStru,SX3->X3_CAMPO,;
						SX3->X3_TAMANHO,;
						SX3->X3_PICTURE,;
						SX3->X3_DECIMAL})
				EndIf
				
				SX3->(dbSkip())
				
			EndDo
		EndIf
		
	Next


Return

